home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / lib / mathlib / libfft / fft2 / second.c < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.2 KB  |  33 lines

  1. /* *****************************************************************************
  2. *
  3. * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  4. * All Rights Reserved.
  5. *
  6. * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  7. * the contents of this file may not be disclosed to third parties, copied or
  8. * duplicated in any form, in whole or in part, without the prior written
  9. * permission of Silicon Graphics, Inc.
  10. *
  11. * RESTRICTED RIGHTS LEGEND:
  12. * Use, duplication or disclosure by the Government is subject to restrictions
  13. * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  14. * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  15. * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  16. * rights reserved under the Copyright Laws of the United States.
  17. *
  18. ***************************************************************************** */
  19. /* include param.h to define BSD or HZ depending on OS */
  20. #include <sys/param.h>
  21.  
  22. #include <sys/time.h>
  23. #include <sys/resource.h>
  24.  
  25. double
  26. second ()
  27. {
  28.   struct rusage ru;
  29.   getrusage (RUSAGE_SELF, &ru);
  30.   return (double)ru.ru_utime.tv_sec + ((double)ru.ru_utime.tv_usec * 1.0e-6);
  31. }
  32.  
  33.